package cn.itcast.mq.config;

import org.springframework.amqp.rabbit.retry.MessageRecoverer;
import org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author liudo
 * @version 1.0
 * @project mq-advanced-demo
 * @description
 * @date 2023/8/22 11:36:49
 */
@Configuration
public class RabbitConfiguration {

    /**
     * 消息恢复器
     *
     * @return {@link MessageRecoverer}
     */
    @Bean
    public MessageRecoverer messageRecoverer() {
        return new RejectAndDontRequeueRecoverer();
    }
}
